/*
 * @Descripttion:
 * @Author: 何伟伦 weilun@ssc-hn.com
 * @Date: 2024-06-04
 * @LastEditors: 何伟伦 weilun@ssc-hn.com
 * @LastEditTime: 2024-06-05
 */

import request from '/@/api/request'

/** 分页查询应用信息列表 */
export const getApplyByPage = (data: ApplyInfoByPageTypes.IRequest) => {
  return request.post<IPaginationResponse<ApplyInfoByPageTypes.IResponse[]>>('/manage/openApiApp/getAppByPage', data)
}
/** 获取订阅组字典 */
export const getApplyByPageEnum = (data: ApplyInfoByPageTypes.IRequest) => {
  return request.post<IPaginationResponse<ApplyInfoByPageTypes.IResponse[]>>('/manage/openApiApp/getAppListByPage', data)
}

/** 应用状态 启用2  通过2  驳回3 禁用3 */
export const updateAppState = (data: UpdateAppStateTypes.IRequest) => {
  return request.post<IBaseResponse<UpdateAppStateTypes.IResponse>>('/manage/openApiApp/updateAppState', data)
}

/** 应用基本详情 */
export const getApplyByDetail = (data: ApplyDetailTypes.IRequest) => {
  const { uuid } = data
  return request.post<IBaseResponse<ApplyDetailTypes.IResponse>>(`/manage/openApiApp/appDetailsByUuid?uuid=${uuid}`, data)
}
